/*
 * Copyright (c) 2015 www.smarthome.com All rights reserved. 本软件源代码版权归----所有,未经许可不得任意复制与传播.
 */
package com.smarthome.domain.bean;

import java.util.Date;
import java.util.List;

import com.smarthome.domain.bean.base.BaseDomain;
import com.smarthome.domain.enums.AccountStatus;

/**
 * shAccount
 * @author KongXiangyu
 * @since 2015-09-07
 */
public class ShAccount extends BaseDomain {

    private static final long serialVersionUID = 1L;
    private Long typeId;// 用户类型id
    private String loginName;// 登录名
    private String loginPwd;// 登录密码
    private String name;// 姓名
    private String headImage;// 头像
    private Integer sex;// 性别
    private String mobile;// 手机号
    private Integer status;// 状态
    private Date lastLoginTime;// 最后登录时间
    private String registrationId;// 消息推送注册号

    // 附加属性
    private String typeName;// 用户类型名称
    private List<ShResidence> residences;
    private Long residenceId;// 小区ID
    private String residenceName;// 小区名称
    private Long doorId;// 门牌ID
    private String doorName;// 门牌
    private Long buildingId;// 楼栋ID
    private String buildingName;// 楼栋名称
    private Long unitId;// 单元ID
    private String unitName;// 单元
    private String statusText;

    public ShAccount() {
        // 默认无参构造方法
    }

    /**
     * 获取 typeId
     * @return
     */
    public Long getTypeId() {
        return typeId;
    }

    /**
     * 设置 typeId
     * @param typeId
     */
    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    /**
     * 获取 loginName
     * @return
     */
    public String getLoginName() {
        return loginName;
    }

    /**
     * 设置 loginName
     * @param loginName
     */
    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    /**
     * 获取 loginPwd
     * @return
     */
    public String getLoginPwd() {
        return loginPwd;
    }

    /**
     * 设置 loginPwd
     * @param loginPwd
     */
    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    /**
     * 获取 name
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * 设置 name
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取 headImage
     * @return
     */
    public String getHeadImage() {
        return headImage;
    }

    /**
     * 设置 headImage
     * @param headImage
     */
    public void setHeadImage(String headImage) {
        this.headImage = headImage;
    }

    /**
     * 获取 sex
     * @return
     */
    public Integer getSex() {
        return sex;
    }

    /**
     * 设置 sex
     * @param sex
     */
    public void setSex(Integer sex) {
        this.sex = sex;
    }

    /**
     * 获取 mobile
     * @return
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * 设置 mobile
     * @param mobile
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * 获取 status
     * @return
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置 status
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取 lastLoginTime
     * @return
     */
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    /**
     * 设置 lastLoginTime
     * @param lastLoginTime
     */
    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(String registrationId) {
        this.registrationId = registrationId;
    }

    public Long getResidenceId() {
        return residenceId;
    }

    public void setResidenceId(Long residenceId) {
        this.residenceId = residenceId;
    }

    public String getResidenceName() {
        return residenceName;
    }

    public void setResidenceName(String residenceName) {
        this.residenceName = residenceName;
    }

    public Long getDoorId() {
        return doorId;
    }

    public void setDoorId(Long doorId) {
        this.doorId = doorId;
    }

    public String getDoorName() {
        return doorName;
    }

    public void setDoorName(String doorName) {
        this.doorName = doorName;
    }

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Long getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(Long buildingId) {
        this.buildingId = buildingId;
    }

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    public String getStatusText() {
        return AccountStatus.getName(this.status);
    }

    public void setStatusText(String statusText) {
        this.statusText = statusText;
    }

    public List<ShResidence> getResidences() {
        return residences;
    }

    public void setResidences(List<ShResidence> residences) {
        this.residences = residences;
    }

}